﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ValuationInterface
{
    /// <summary>
    /// 项目立项，勘察，评估，审核接口
    /// </summary>
    public interface IUsers
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="Account"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        T Login<T>(string Account, string pwd);
        /// <summary>
        /// 单个实体查询
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        List<T> GetList<T>();
        /// <summary>
        /// 根据id查询单个实体
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetEntity<T>(int id);
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        bool AddEntity<T>(T t);
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        bool DelEntity<T>(int id);
        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        bool UpdEntity<T>(T t);
    }
}
